<script>
  export let label = '';
  export let required = false;
</script>

{#if label}
  <label class="field-label">
    {label}
    {#if required}<span class="required">*</span>{/if}
  </label>
{/if}

<style>
  .field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: rgba(18, 18, 18, 0.7);
    font-weight: normal;
  }
  
  .required {
    color: rgba(238, 70, 70, 1);
    margin-left: 2px;
  }
</style>
